<template>
    <div>
        <ly-tab v-model="selectedId" :items="items" :options="options" @change="handleChange" />
        <router-view></router-view>
    </div>
</template>

<script>
export default {
    name:"home",
    data(){
        return {
            selectedId:0, //选中id
            items:[
                
                {label:'外卖券'},
                {label:'出行券'},
                {label:'网购券'},
                {label:'快餐券'},
                {label:'娱乐券'}
                
            ],
            options:{
                activeColor:'#d70004'
            },

            subrouter:[
                '/home/waimai',
                '/home/chuxing',
                '/home/wanggou',
                '/home/kuaican',
                '/home/yule'
            ]
        }
    },
    methods:{
        handleChange(item,index){
            this.$router.replace(this.subrouter[index])
        }
    }
}
</script>

<style scoped>
.ly-tab-list{
    padding: 20px 10px;
}
</style>